package com.fqgj.xjd.user.client;


import com.fqgj.common.api.Response;
import com.fqgj.xjd.user.client.request.CookieRequest;
import com.fqgj.xjd.user.client.request.CreditAuthRequest;
import com.fqgj.xjd.user.client.request.CustomerCreditCallbackRequest;
import com.fqgj.xjd.user.client.response.CreditAuthResponse;

import java.util.List;

/**
 * @ClassName:
 * @Description: 用户授权服务
 * @Author zhangxingyun
 * @Create 2017-07-21 09:37
 */
public interface UserAuthService {

    /**
     * 实名认证成功
     * @param creditAuth
     * @return
     * todo 1.认证成功时，需要生产customer，并在user_access中关联customerCode
     * todo 完成，等待测试
     */
    Response<Boolean> creditAuth(CreditAuthRequest creditAuth);


    /**
     * 更具用户id获取用户的实名认证信息
     * @param userCode
     * @return
     */
    Response<CreditAuthResponse> getCreditAuthInfoByUserCode(String userCode);


    /**
     * 取消授权
     * @param creditAuth
     * @return
     */
    Response<Boolean> cancelAuth(CreditAuthRequest creditAuth);



    /**
     * 学信网认证
     * @param userCode
     * @param username
     * @param password
     * @return
     */
    Response<Boolean> userXuexinAuth(String userCode, String username, String password);


    /**
     * 京东认证
     * @param userCode
     * @param username
     * @param password
     * @param verifyCode
     * @return
     */
    Response<String> userJDAuth(String userCode, String username, String password, String verifyCode);


    /**
     * 淘宝认证
     * @param userCode
     * @param cookies
     * @return
     */
    Response<String> userTaobaoAuth(String userCode,  List<CookieRequest> cookies);


    /**
     * QQ认证
     * @param userCode
     * @param qq
     * @param password
     * @return
     */
    Response<Boolean> userQQAuth(String userCode, String qq, String password);

    /**
     * KrazyBee 信用报告
     */
    Response<Boolean> addUserKrazyBeeCrediteReport(CustomerCreditCallbackRequest customerCreditCallbackRequest);

}
